<?php

namespace App\Services\Api;

/**
 *解决方案列表
 *供应链列表
 */
class CMS50102
{
    public $apiCode = 'CMS#50102';
    public $typeId = 1;
    public $pageNo = 1;
    public $pageSize = 10;
    public $domainId = 1;
    public $title = '';
    public $techRoute = -1;

    public function getInitPostData($postData)
    {
        return [
            'pageNo' => $this->getPageNo(@$postData['pageNo']),
            'pageSize' => $this->getPageSize(@$postData['pageSize']),
            'domainId' => $this->getDomainId(@$postData['domainId']),
            'techRoute' => $this->getTechRoute(@$postData['techRoute']),
            'name' => $this->getTitle(@$postData['title']),
            'typeId' => $this->getTypeId(@$postData['typeId']),

        ];
    }

    public function getPageNo($pageNo = '')
    {
        return $pageNo ? $pageNo : $this->pageNo;
    }

    public function getPageSize($pageSize = '')
    {
        return $pageSize ? $pageSize : $this->pageSize;
    }

    public function getDomainId($domainId = '')
    {
        return $domainId ? $domainId : $this->domainId;
    }
    public function getTechRoute($techRoute = '')
    {
        return $techRoute ? $techRoute : $this->techRoute;
    }

    public function getTitle($title = '')
    {
        return $title ? $title : $this->title;
    }

    public function getTypeId($typeId = '')
    {
        return $typeId ? $typeId : $this->typeId;
    }

    public function getInitApiCode()
    {
        return $this->apiCode;
    }

}
